<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="common/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<title>My JSP 'hello.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">

<head>
<%
	String error1 = (String) request
			.getAttribute(FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME);
	if (error1 != null) {
%>
<script type="text/javascript">
$(document).ready(function(){
  alert($("#loginForm"));
});
</script>

<%
	}
%>



</head>
<body>
	<%
		String error = (String) request
				.getAttribute(FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME);
		if (error != null) {
	%>
	<div class="error prepend-top">登录失败，请重试.</div>

	<%
		}
	%>
	<form:form id="loginForm" action="login" method="post">
		<fieldset class="prepend-top">
			<legend>登录</legend>
			<div>
				<label for="username" class="field">名称:</label> <input type="text"
					id="username" name="username" size="25" value="${username}"
					class="required" />
			</div>
			<div>
				<label for="password" class="field">密码:</label> <input
					type="password" id="password" name="password" size="25"
					class="required" />
			</div>
		</fieldset>
		<div>
			<input type="checkbox" id="rememberMe" name="rememberMe" /> <label
				for="rememberMe">记住我</label> <span style="padding-left: 10px;"><input
				id="submit" class="button" type="submit" value="登录" /></span>
		</div>
		<div>
			(管理员<b>admin/admin</b>, 普通用户<b>user/user</b>)
		</div>
	</form:form>
	 
</body>
</html>